package com.ruoyi.system.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.BdmRechargeSettings;
import com.ruoyi.system.mapper.BdmRechargeSettingsMapper;
import com.ruoyi.system.service.IBdmRechargeSettingsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 充值设置Service业务层处理
 *
 * @author ruoyi
 * @date 2025-04-21
 */
@Service
public class BdmRechargeSettingsServiceImpl implements IBdmRechargeSettingsService
{
    @Autowired
    private BdmRechargeSettingsMapper bdmRechargeSettingsMapper;

    /**
     * 查询充值设置
     *
     * @param id 充值设置主键
     * @return 充值设置
     */
    @Override
    public BdmRechargeSettings selectBdmRechargeSettingsById(String id)
    {
        return bdmRechargeSettingsMapper.selectBdmRechargeSettingsById(id);
    }

    /**
     * 查询充值设置列表
     *
     * @param bdmRechargeSettings 充值设置
     * @return 充值设置
     */
    @Override
    public List<BdmRechargeSettings> selectBdmRechargeSettingsList(BdmRechargeSettings bdmRechargeSettings)
    {
        return bdmRechargeSettingsMapper.selectBdmRechargeSettingsList(bdmRechargeSettings);
    }

    /**
     * 新增充值设置
     *
     * @param bdmRechargeSettings 充值设置
     * @return 结果
     */
    @Override
    public int insertBdmRechargeSettings(BdmRechargeSettings bdmRechargeSettings)
    {
        bdmRechargeSettings.setCreateTime(DateUtils.getNowDate());
        return bdmRechargeSettingsMapper.insertBdmRechargeSettings(bdmRechargeSettings);
    }

    /**
     * 修改充值设置
     *
     * @param bdmRechargeSettings 充值设置
     * @return 结果
     */
    @Override
    public int updateBdmRechargeSettings(BdmRechargeSettings bdmRechargeSettings)
    {
        bdmRechargeSettings.setUpdateTime(DateUtils.getNowDate());
        return bdmRechargeSettingsMapper.updateBdmRechargeSettings(bdmRechargeSettings);
    }

    /**
     * 批量删除充值设置
     *
     * @param ids 需要删除的充值设置主键
     * @return 结果
     */
    @Override
    public int deleteBdmRechargeSettingsByIds(String[] ids)
    {
        return bdmRechargeSettingsMapper.deleteBdmRechargeSettingsByIds(ids);
    }

    /**
     * 删除充值设置信息
     *
     * @param id 充值设置主键
     * @return 结果
     */
    @Override
    public int deleteBdmRechargeSettingsById(String id)
    {
        return bdmRechargeSettingsMapper.deleteBdmRechargeSettingsById(id);
    }
}
